<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<title>Student</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="shortcut icon" th:href="@{/img/favicon.jpg}" type="image/x-icon">
	<link rel="stylesheet" th:href="@{pearAdminLayUI/component/pear/css/pear.css}" />
	<link rel="stylesheet" th:href="@{pearAdminLayUI/admin/css/loader.css}" />
	<link rel="stylesheet" th:href="@{pearAdminLayUI/admin/css/admin.css}" />
<!--	<link rel="stylesheet" th:href="@{pearAdminLayUI/component/pear/css/module/toast.css}" />-->
	<script th:src="@{pearAdminLayUI/component/layui/layui.js}"></script>
	<script th:src="@{pearAdminLayUI/component/pear/pear.js}"></script>
</head>
<body class="layui-layout-body pear-admin">
	<div class="layui-layout layui-layout-admin">
		<!-- 顶部样式 -->
		<div class="layui-header">
			<!-- 菜单顶部 -->
			<div class="layui-logo">
				<img class="logo">
				<span class="title"></span>
			</div>
			<!-- 顶部左侧功能 -->
			<ul class="layui-nav layui-layout-left">
				<li class="collapse layui-nav-item"><a href="#" class="layui-icon layui-icon-shrink-right"></a></li>
				<li class="refresh layui-nav-item"><a href="#" class="layui-icon layui-icon-refresh-1" loading=600 ></a></li>
			</ul>
			<!-- 多 系 统 菜 单 -->
			<div id="control" class="layui-layout-control"></div>
			<!-- 顶 部 右 侧 菜 单 -->
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item layui-hide-xs"><a href="#" class="menuSearch layui-icon layui-icon-search"></a></li>
				<li class="layui-nav-item layui-hide-xs"><a href="#" class="fullScreen layui-icon layui-icon-screen-full"></a></li>
				<li class="layui-nav-item layui-hide-xs"><a href="/search/index" class="layui-icon layui-icon-website"></a></li>
				<li class="layui-nav-item layui-hide-xs message"></li>
				<li class="layui-nav-item user">
					<!-- 头 像 -->
					<a class="layui-icon layui-icon-username" href="javascript:;"></a>
					<!-- 功 能 菜 单 -->
					<dl class="layui-nav-child">
						<dd><a user-menu-url="view/system/person.html" user-menu-id="5555" user-menu-title="基本资料">基本资料</a></dd>
						<dd><a href="javascript:void(0);" class="logout">注销登录</a></dd>
					</dl>
				</li>
				<!-- 主 题 配 置 -->
				<li class="layui-nav-item setting"><a href="#" class="layui-icon layui-icon-more-vertical"></a></li>
			</ul>
		</div>
		<!-- 侧边区域 -->
		<div class="layui-side layui-bg-black">
			<!-- 菜单顶部 -->
			<div class="layui-logo">
				<img class="logo">
				<span class="title"></span>
			</div>
			<!-- 菜单内容 -->
			<div class="layui-side-scroll">
				<div id="sideMenu"></div>
			</div>
		</div>
		<!-- 视图页面 -->
		<div class="layui-body">
			<div id="content"></div>
		</div>
		<!-- 遮盖层 -->
		<div class="pear-cover"></div>
		<!-- 加载动画 -->
		<div class="loader-main">
			<div class="loader"></div>
		</div>
	</div>
	<!-- 移动端 便捷操作 -->
	<div class="pear-collapsed-pe collapse">
		<a href="#" class="layui-icon layui-icon-shrink-right"></a>
	</div>
	<script>
		layui.use(['admin','jquery','popup','toast'], function() {
			const $ = layui.jquery,
				admin = layui.admin,
				popup = layui.popup,
				toast = layui.toast;
			window.tools = {
				toastInfo: function (msg) {
					toast.info({title: "", message: msg})
				},
				toastSuccess: function (msg) {
					toast.success({title: "", message: msg})
				},
				toastError: function (msg) {
					toast.error({title: "", message: msg})
				}
			}
			tools.toastSuccess("欢迎回家...")

			admin.setConfigType("yml");
			admin.setConfigPath("pearAdminLayUI/config/pear.config.yml");
			admin.render();


			// 登出逻辑
			admin.logout(function(){
				popup.success("注销成功",function(){
					location.href = "login";
				})
				// 注销逻辑 返回 true / false
				return true;
			})

			// 消息点击回调
			// admin.message(function(id, title, context, form) {});
		})
	</script>
</body>
</html>